<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<%@ page isELIgnored ="false" %>
<html>
<head>
<title>前台管理--缺货登记管理</title>
<script type="text/javascript" src="${ctx}/script/common/common.js"></script>
<script language="javascript" type="text/javascript" src="${ctx}/script/Date/WdatePicker.js"></script>
<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
</head>

<body>
<input type="hidden" id="ctx" value="${ctx}"> 
<html:form action="/others/lackManage" method="post">
<input type="hidden" name="method" value="list"/>
<div style="padding:7px 0px 7px 10px">
起始日期：<input class="Wdate" id="startDate" name="startDate" type="text" onfocus="new WdatePicker()" MAXDATE="#F{$('endDate').value}"  value="${startDate}"  onPicked="$('endDate').onfocus()" readonly="readonly"/>
结束日期：<input class="Wdate" id="endDate" name="endDate" type="text" onfocus="new WdatePicker()" MINDATE="#F{$('startDate').value}" value="${endDate}" readonly="readonly"/>
&nbsp;&nbsp;
<input type="submit" class="btn" value="查询"/><br/>
</div>
<table width="100%" align="center" >
	 <tr>
	    	<th class="td_01">类别</th>	    	
	    	<th class="td_01">品牌</th>
	    	<th class="td_01">型号</th>
	    	<th class="td_01">描述</th>
	    	<th class="td_01">发布人</th>
	    	<th class="td_01">发布时间</th>
	    	<th class="td_01">电话</th>
	    	<th class="td_01">E-mail</th>
			<th class="td_01">操作</th>
	    </tr>
	<logic:present name="LackRange">
		<logic:iterate id="lack" name="LackRange" property="records">
			<tr>
				<td class="td_03">${lack.catalog}</td>
				<td class="td_03">${lack.brand}</td>
				<td class="td_03">${lack.name}</td>
				<td class="td_03">${lack.content}</td>
				<td class="td_03">${lack.username}</td>
				<td class="td_03" nowrap>${lack.time}</td>
				<td class="td_03" nowrap>${lack.telephone}</td>
				<td class="td_03" nowrap>${lack.email}</td>
				<td class="td_03" nowrap>
				<a href="#"	onmousedown="javascript:deletelack(${lack.id});">删除</a></td>
			</tr>
		</logic:iterate>
	</logic:present>
	<tr>
		<td colspan="9" align="right">
		<%@ include file="/pages/safeai/jsp/common/page.jsp"%>&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
	</tr>
</table>
</html:form>
</body>
<script type="text/javascript">
var ctxvalue="";
window.onload=function(){
   var ctx=document.getElementById("ctx");
   ctxvalue=ctx.value+"";
}
function deletelack(id){
    var startDate=document.getElementById("startDate");
    var endDate=document.getElementById("endDate");
    if(confirm('是否删除？')==true){
        location.href=ctxvalue+"/others/lackManage.do?method=delete&lack.id="+id+"&startDate="+startDate.value+"&endDate="+endDate.value;
    }
}

</script>
</html>